package com.zmn.oms.common.dio.normal.order;

import com.zmn.oms.common.dio.channel.ChannelApiExtraData;
import com.zmn.oms.common.dio.normal.OrderWorkBaseDIO;
import com.zmn.oms.common.dio.normal.orderadd.*;
import com.zmn.oms.common.dio.shop.ExternalShopDIO;
import com.zmn.oms.common.dto.OrderWorkAddOperator;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.List;

/**
 * 类描述：新单-普通工单
 *
 * @author wangxiaokun
 * @since 2021/04/01 10:43
 */
@Data
@ToString(callSuper = true)
@ApiModel("新增普通工单入参")
public class NormalOrderWorkAddDIO extends OrderWorkAddOperator implements Serializable {

    private static final long serialVersionUID = -2620773844435559497L;

    /**
     * 一口价 1 否 2 是
     */
    @ApiModelProperty("一口价 1 否 2 是")
    private Integer finalPrice;

    /**
     * 服务项类型，目前仅支持两种类型： 1.工单服务项 2.故障服务项
     * 若值不等于2，则均作为值等于1处理
     * @see com.zmn.oms.common.constant.OrderConsts#SERVICE_ITEM_TYPE_ORDER
     * @see com.zmn.oms.common.constant.OrderConsts#SERVICE_ITEM_TYPE_FAULT
     */
    @ApiModelProperty("服务项类型，目前仅支持两种类型： 1.工单服务项 2.故障服务项")
    private Integer servItemType;

    /**
     * 用户信息
     */
    @Valid
    @ApiModelProperty(value = "用户信息", required = true)
    @NotNull(message = "用户信息不能为空")
    private UserDIO userDIO;

    /**
     * 订单基础信息
     */
    @Valid
    @ApiModelProperty(value = "订单基础信息", required = true)
    @NotNull(message = "订单基础信息不能为空")
    private OrderWorkBaseDIO orderWorkBaseDIO;

    /**
     * 产品
     */
    @Valid
    @ApiModelProperty(value = "服务产品不能为空", required = true)
    @NotNull(message = "服务产品不能为空")
    private OrderProductDIO orderProductDIO;

    /**
     * 优惠信息
     */
    @ApiModelProperty(value = "优惠信息")
    private OrderAmountAndDiscountDIO orderAmountAndDiscountDIO;

    /**
     * 扩展数据
     */
    @ApiModelProperty("扩展数据")
    private ExtraData extraData;

    /**
     * 快递信息
     */
    @ApiModelProperty("快递信息")
    private List<OrderWorkPostAddDIO> orderPostList;

    /**
     * 派单工程师信息
     */
    @ApiModelProperty("派单工程师信息")
    private OrderDistributeMasterDIO distributeMasterDIO;

    /**
     * 渠道API扩展数据 后台也可录入渠道相关信息
     */
    @ApiModelProperty(value = "渠道API扩展数据")
    private ChannelApiExtraData channelApiExtraData;

    @ApiModelProperty("外部店铺信息")
    private ExternalShopDIO externalShopInfo;
}
